package com.boilermaker;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/testLogger")
public class Demo5 {
    //private static Logger logger = LoggerFactory.getLogger(Demo5.class);

    @RequestMapping("/print")
    public void setLogger() {
        log.error("这是 ERROR 级别的日志");
        log.warn("这是 WARN 级别的日志");
        log.info("这是 INFO 级别的日志");
        log.debug("这是 DEBUG 级别的日志");
        log.trace("这是 TRACE 级别的日志");
    }
}
